package com.pro.common.api.model;

import com.pro.common.api.enums.EnumLoginEntrance;
import com.pro.common.api.enums.EnumSysRole;
import com.pro.common.api.enums.IEnumLoginEntrance;
import com.pro.framework.api.FrameworkConst;
import com.pro.framework.api.database.IContext;
import com.pro.framework.api.model.IModel;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;

public interface ILoginInfo extends Serializable, IContext, IModel {
    String HEADER_KEY_MAIN = "X-LOGIN-INFO";
    String HEADER_KEY_ROLE = "X-LOGIN-ROLE";

    //系统角色
    EnumSysRole getSysRole();

    String getUsername();

    Boolean getIsDemo();

    String getPassword();

    void setPassword(String password);

    Boolean getEnabled();

    Boolean getIsGuest();

    String getAuthRouteGroupCode();

    default Boolean getGoogleAuthOpen() {
        return false;
    }

    //    Set<String> getPermissionPaths();
    default String getRoleIds() {
        return FrameworkConst.Str.EMPTY;
    }

    //    Set<String> getPermissionPathsPrefix();
    default String getPhoto() {
        return null;
    }

    default String getLoginEntrance() {
        return EnumLoginEntrance.DEFAULT.name();
    }

    default void setLoginEntrance(String loginEntrance) {
    }

}
